<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首页图文管理</title>
<link href="public/admin.css" rel="stylesheet" type="text/css" />
    <link href="../public/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="public/jquery.js" language="javascript" type="text/javascript"></script>
<script>
	
	$(document).ready(function(){
		$(function(){					   
		$.post("getlist.php",{"type":"0"},function(data){
            var html='<table width="100%" border="0" cellspacing="0" cellpadding="0">';
            html += '<tr>';
            html += '<td>文章ID</td>';
            html += '<td>文章标题</td>';
            html += '<td>文章作者</td>';
            html += '<td>发布时间</td>';
            html += '<td>操作</td>';
            html += '</tr>';
            $.each(data,function(i,item){

                html += '<tr>';
                html += '<td>'+item['aid']+'</td>';
                html += '<td>'+item['title']+'</td>';
                html += '<td>'+item['author']+'</td>';
                html += '<td>'+item['pubdate']+'</td>';
                html += '<td><a href="edit_article.php?id='+item['id']+'">编辑</a> | <a href="add_banner.php?type=0&id='+item['id']+'&title='+item['title']+'&path='+item['imgurl']+'">推荐到banner</a>  |<a href="del.php?type=0&id='+item['id']+'">删除</a></td>';
                html += '</tr>';

            });
            html += '</table>';
            $("#content").append(html);
		},"json");
		});						
	});

</script>
</head>

<body>
    <a href="add_article.html"><button>添加文档</button></a>

	<div id="content">

    </div>
</body>
</html>
